package smashedapples.google.consts
{
	import smashedapples.adobe.stratus.StratusAPI;
	
	public class GoogleConsts
	{
		
		public static function SUGGEST_URL( q:String = "" ):String
		{
			return "http://suggestqueries.google.com/complete/search?json=t&q=" + q;
		}
		
		
		public static const CALENDAR_DATA_API_SOURCE:String = "cl";
		public static const GOOGLE_BASE_API_SOURCE:String = "gbase";
		public static const BLOGGER_DATA_API_SOURCE:String = "blogger";
		public static const CONTACTS_DATA_API_SOURCE:String = "cp";
		public static const DOCUMENTS_LIST_DATA_API_SOURCE:String = "writely";
		public static const PICASA_WEB_ALBUMS_DATA_API_SOURCE:String = "lh2";
		public static const GOOGLE_APPS_PROVISIONING_API_SOURCE:String = "apps";
		public static const SPREAD_SHEETS_DATA_API_SOURCE:String = "wise";
		public static const YOUTUBE_DATA_API_SOURCE:String = "youtube";
		public static const FINANCIAL_DATA_API_SOURCE:String = "finance";
		
		
		
		
		
		public static const CLIENT_LOGIN_URL:String = "https://www.google.com/accounts/ClientLogin";
		
		
		public static function FINANCIALS_STOCK_QUOTE_URL( symbols:Array ):String
		{
			
			var url:String = "http://finance.google.com/finance/info?q=";
			
			for each( var symbol:String in symbols )
			{
				url = url + symbol + ",";
			}
			
			url = url.slice( 0, -1 );
			
			return url;
		} 
		
		
		
		public static const FINANCIALS_PORTFOLIOS_URL:String = "http://finance.google.com/finance/feeds/default/portfolios?returns=true";
		
		public static function FINANCIALS_POSITIONS_URL( position:int ):String
		{
			return "http://finance.google.com/finance/feeds/default/portfolios/" + position + "/positions?returns=true";
		}
		
	}
}